package com.zzuli.fitness.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzuli.fitness.entity.Coach;
import com.zzuli.fitness.mapper.CoachDao;
import com.zzuli.fitness.service.CoachService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("coachService")
public class CoachServiceImpl extends ServiceImpl<CoachDao, Coach> implements CoachService {
    @Autowired
    private CoachDao coachDao;

    @Override
    public Coach getByName(String name) {
        return coachDao.selectByName(name);
    }

    @Override
    public Coach selectCoachById(Integer coachId) {
        return coachDao.selectByPrimaryKey(coachId);
    }
}
